<?php
return [
    'douyu'  => [
        'detail' => [
            'uri'        => 'http://open.douyucdn.cn/api/RoomApi/room/',
            'containers' => [
                'data'
            ],
            'field'      => [
                'id'    => 'room_id',
                'name'  => 'room_name',
                'owner' => 'owner_name',
                'pop'   => 'hn',
                'src'   => 'room_thumb'
            ]
        ],
        'list'   => [
            'uri'        => 'http://open.douyucdn.cn/api/RoomApi/live/',
            'containers' => [
                'data'
            ],
            'field'      => [
                'id'    => 'room_id',
                'name'  => 'room_name',
                'owner' => 'nickname',
                'pop'   => 'hn',
                'url'   => 'url',
                'src'   => 'room_src'
            ]
        ]
    ],
    'huomao' => [
        'detail' => [
            'uri'        => 'https://www.huomao.com/',
            'containers' => \App\Lib\Huomao::class,
        ],
        'list' => [
            'containers' => [
                'data',
                'channelList'
            ],
            'field'      => [
                'id'    => 'room_number',
                'name'  => 'channel',
                'owner' => 'username',
                'pop'   => 'originviews',
                'url'   => [
                    'https://www.huomao.com/',
                    ':room_number'
                ],
                'src'   => 'image',
            ]
        ]
    ],
    'panda'  => [
        'detail' => [
            'uri'        => 'https://www.panda.tv/api_rooms_videoinfo?roomids=',
            'containers' => [
                'data'
            ],
            'field'      => [
                'id'    => 'id',
                'name'  => 'name',
                'pop'   => 'person_num',
                'src'   => 'pictures.img'
            ]
        ],
        'list' => [
            'uri'        => 'https://www.panda.tv/ajax_sort?pageno=1&pagenum=120&order=top&classification=',
            'containers' => [
                'data',
                'items',
            ],
            'field'      => [
                'id'    => 'id',
                'name'  => 'name',
                'owner' => 'userinfo.nickName',
                'pop'   => 'person_num',
                'url'   => [
                    'https://www.panda.tv/',
                    ':id'
                ],
                'src'   => 'pictures.img'
            ]
        ]
    ],
    'huya'   => [
        'detail' => [
            'uri'        => 'http://open.douyucdn.cn/api/RoomApi/room/',
            'containers' => [
                'data'
            ],
            'field'      => [
                'id'    => 'privateHost',
                'name'  => 'room_name',
                'owner' => 'owner_name',
                'pop'   => 'hn',
                'src'   => 'room_thumb'
            ]
        ],
        'list' => [
            'uri'        => 'https://www.huya.com/cache10min.php?m=Live&do=getProfileRecommendList&gid=',
            'containers' => [
                'data'
            ],
            'field'      => [
                'id'    => 'privateHost',
                'name'  => 'roomName',
                'owner' => 'nick',
                'pop'   => 'attendeeCount',
                'url'   => [
                    'https://www.huya.com/',
                    ':privateHost'
                ],
                'src'   => 'screenshot'
            ]
        ]
    ]
];